<template>
	<view class="page">
		<view class="bar_info" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class="title_bar">
				<view class="title_bar_left" @tap.stop="isBack">
					<u-icon size="38" color="#000" name="arrow-left"></u-icon>
				</view>
				<view class="title_bar_center">
					<text>{{name}}</text>
				</view>
				<view class="title_bar_right"></view>
			</view>
		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		
		<view class="loading_css" v-if="isShow">
			<u-loading size="36" color="#0E7EFD"></u-loading>
			<view class="loading_text">加载中</view>
		</view>
		
		<view class="information" v-else>
			<!-- <view class="title">
				{{detailsInfo.title}}
			</view>
			<view class="introduce">
				<view class="introduce_left">
					<text class="introduce_left_1">{{detailsInfo.author}}</text>
					<text class="introduce_left_2">{{detailsInfo.create_time}}</text>
				</view>
				<view class="introduce_right">
					<text>分享</text>
					<image src="/static/tabbar/tab3_3.png" mode=""></image>
				</view>
			</view> -->
			<view class="information_content" v-if="type == 1">
				<u-parse :html="detailsInfo.score_ranking"></u-parse>
			</view>
			<view class="information_content" v-else>
				<u-parse :html="detailsInfo.score_pay"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isShow: true,
				content: '123456345135',
				id: '',  // 详情id
				detailsInfo: {},
				type: 1,
				name: ""
			}
		},
		onLoad(option) {
			let {type, name} = option;
			if (type !== undefined) this.type = type;
			if (name !== undefined) this.name = name;
			this.getDetails();
		},
		methods: {
			// 获取详情
			getDetails() {
				this.$api.post(global.apiUrls.postScoreRank, {
					
				}).then(res => {
					this.isShow = false;
					if (res.data.code == 1) {
						this.detailsInfo = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			isBack() {
				uni.navigateBack();
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		// background-color: #fff !important;
	}
	.page {
		height: 100%;
		// background-color: #fff !important;
		.bar_info {
			width: 750rpx;
			height: 88rpx;
			overflow: hidden;
			// border-bottom: 1px solid #eee;
			// background: #fff;
			z-index: 10;
			position: fixed;
			top: 0rpx;
		
			.title_bar {
				padding: 0 32rpx;
				display: flex;
				justify-content: space-between;
		
				.title_bar_left {
					width: 50rpx;
					display: flex;
					align-items: center;
				}
		
				.title_bar_center {
					line-height: 88rpx;
					font-size: 36rpx;
					font-weight: 400;
				}
		
				.title_bar_right {
					width: 50rpx;
				}
			}
		}
		.information {
			// padding: 30rpx 24rpx;
			.title {
				font-size: 44rpx;
				line-height: 72rpx;
				color: #000;
				padding: 0 24rpx;
			}
			.introduce {
				margin: 40rpx 0 15rpx;
				padding: 0 24rpx;
				display: flex;
				justify-content: space-between;
				.introduce_left {
					display: flex;
					align-items: center;
					.introduce_left_1 {
						font-size: 24rpx;
						color: #666;
						padding: 8rpx 24rpx;
						background: #EEEEEE;
						border-radius: 10rpx;
					}
					.introduce_left_2 {
						font-size: 24rpx;
						color: #999;
						margin-left: 36rpx;
					}
				}
				.introduce_right {
					display: flex;
					align-items: center;
					color: #0278FC;
					font-size: 24rpx;
					image {
						width: 26rpx;
						height: 26rpx;
						margin-left: 12rpx;
					}
				}
			}
			.information_content {
				padding: 32rpx;
			}
		}
	}
</style>